import request from "@/utils/request";

// 物流付款单-列表
export const getLogisticsPayOrder = (data) =>
  request({
    url: `/finance/logistics-pay-order/index`,
    method: "post",
    data,
  });
// 物流付款单-创建
export const addLogisticsPayOrder = (data) =>
  request({
    url: `/finance/logistics-pay-order/create`,
    method: "post",
    data,
  });
// 物流付款单-编辑
export const updateLogisticsPayOrder = (data) =>
  request({
    url: `/finance/logistics-pay-order/update`,
    method: "post",
    data,
  });

//物流付款单-详情
export const detailLogisticsPayOrder = (params) =>
  request({
    url: `/finance/logistics-pay-order/detail`,
    method: "get",
    params,
  });
//物流付款单-提交
export const submitLogisticsPayOrder = (data) =>
  request({
    url: `/finance/logistics-pay-order/submit`,
    method: "post",
    data,
  });

//物流付款单-作废
export const cancelLogisticsPayOrder = (data) =>
  request({
    url: `/finance/logistics-pay-order/cancel`,
    method: "post",
    data,
  });

//物流付款单-审核
export const auditLogisticsPayOrder = (data) =>
  request({
    url: `/finance/logistics-pay-order/audit`,
    method: "post",
    data,
  });

//物流付款单-付款
export const payLogisticsPayOrder = (data) =>
  request({
    url: `/finance/logistics-pay-order/pay`,
    method: "post",
    data,
  });

//获取物流商数据
export const logisticsList = (data) =>
  request({
    url: `/opts/logistics`,
    method: "post",
    data,
  });

//获取物流商对应的收款单位数据
export const logisticsFinance = (data) =>
  request({
    url: `/opts/logistics_finance`,
    method: "post",
    data,
  });
//批量打印
export const batchPrint = (data) =>
  request({
    url: `finance/logistics-pay-order/batch-print`,
    method: "post",
    data,
  });

//物流商账期配置
export const logisticsBpConfig = data =>
  request({
    url: `/opts/logistics-bp-config`,
    method: 'post',
    data,
  })